import request from "@/utils/request";

export const queryPageApi = (params) =>
  request.get("/depts", { params: params });

export const addApi = (data) => request.post("/depts", data);

//查询回显
export const queryByIdApi = (id) => request.get(`/depts/${id}`);
//修改部门
export const updateApi = (data) => request.put("/depts", data);
//删除部门
export const deleteApi = (id) => request.delete(`/depts/${id}`);

// 获取所有部门
export const getAllDeptsApi = () => request.get("/depts/list");
